package com.obas.menus {

	import com.ease.core.components.menus.AbstractMenuProvider;
	import com.ease.core.components.menus.IMenuProvider;
	import com.obas.constants.StringConstants;
	import com.obas.utils.ResourceUtil;

	import flash.events.Event;

	import mx.events.MenuEvent;

	public class WindowMenuProvider extends AbstractMenuProvider {
		public var perspectiveMenuProvider:IMenuProvider;

		override public function appendMenuItem(root:Object):void {
			var menuItems:Object={label: ResourceUtil.getString(StringConstants.MAIN_MENU_WINDOW),
					children: [
					   {label: "New Window", listener: onMenuItemClick},
						{label: "New Editor", listener: onMenuItemClick},
						{type: "separator"},
						{label: "Open Prespective...",
							children: [
							{label: "Java", icon: "documentIconClass", listener: onMenuItemClick},
								{label: "Flex", icon: "documentIconClass", listener: onMenuItemClick},
								{label: "CVS", icon: "documentIconClass", listener: onMenuItemClick},
								{type: "separator"},
								{label: "Other", listener: onMenuItemClick}
							]
						},
						{label: "Open View...",
							children: [
							{label: "Console", icon: "documentIconClass", listener: onMenuItemClick},
								{label: "Explorer", icon: "documentIconClass", listener: onMenuItemClick},
								{label: "Outlines", icon: "documentIconClass", listener: onMenuItemClick},
								{type: "separator"},
								{label: "Other", listener: onMenuItemClick}
							]
						},
						{type: "separator"},
						{label: "Customize Prespective...", listener: onMenuItemClick},
						{label: "Save Prespective As...", listener: onMenuItemClick},
						{label: "Reset Prespective...", listener: onMenuItemClick},
						{label: "Close Prespective", listener: onMenuItemClick},
						{label: "Close All Prespectives", listener: onMenuItemClick},
						{type: "separator"},
						{label: "Navigation",
							children: [
							   {label: "Activate Editor", icon: "documentIconClass", listener: onMenuItemClick},
								{label: "Next Editor", icon: "documentIconClass", listener: onMenuItemClick},
								{label: "Previous Editor", icon: "documentIconClass", listener: onMenuItemClick}
							]
						},
						{label: "Switch Source/Design Mode", listener: onMenuItemClick},
						{label: "Preferences", icon: "documentIconClass", listener: onPreferences}
				]
				};
//			perspectiveMenuProvider.appendMenuItem(menuItems);
			menuItems.children.push({type: "separator"});
			menuItems.children.push({label: "Preferences", icon:"iconPreferenceClass", listener: onPreferences});
         root.children.push(menuItems);
		}

		public function onPreferences(event:MenuEvent):void {
		}
	}
}
